#pragma once
#ifndef __WIND32WINDOW_H__
#define __WIND32WINDOW_H__

#include "Utility.h"

#include "../util/PreDeclare.h"
#include "../util/D3DCommon.h"

namespace WindGE
{
	class WIND_CORE_API Win32Window
	{
	public:
		Win32Window();
		~Win32Window();

		inline HINSTANCE app_inst() const { return app_inst_; }
		inline HWND hwnd() const { return hwnd_; }
		inline int width() const { return client_width_; }
		inline int height() const { return client_height_; }

		inline void set_app(ApplicationPtr app) { app_ = app; }

		bool init(HINSTANCE appInst, int width, int height);
		void resize();
		int  run();

		virtual LRESULT msg_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);

	protected:
		HINSTANCE		app_inst_;
		HWND			hwnd_;

		bool			paused_;
		bool			minimized_;
		bool			maximized_;
		bool			resizing_;

		std::wstring	title_;
		int				client_width_;
		int				client_height_;

		ApplicationPtr	app_;
	};
}

#endif // !__WIND32WINDOW_H__

